const path = require('path')
module.exports = {
  publicPath: process.env.NODE_ENV === "production" ? "./" : "/",
  outputDir: "question",
  productionSourceMap: false,
  devServer: {
    https: false,
    port: 8080,
    proxy: {
      "^/API": {
        target: "http://api.xiaozhaobishi.cn/index.php", // 代理接口(注意只要域名就够了)
        changeOrigin: true, //是否跨域
        ws: true, // proxy websockets
        pathRewrite: {
          //重写路径
          "^/API": "/", //代理路径
        },
      }
    },
  },
  configureWebpack: {
    resolve: {
      alias: {
        common: "@/common",
        components: "@/components",
        network: "@/network",
        assets: "@/assets",
        views: "@/views",
        store: "@/store",
      },
    },
  }
};
